<%@page import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String bathpath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/"+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Product</title>
    <link rel="stylesheet" type="text/css" href="./css/style.css">
    <link rel="stylesheet" href="img/Product/awesome/css/font-awesome.min.css" type="text/css"/>
</head>
<body id="m-Product">
<div id="header">
    <div class="clearfix" id="headerTop">
        <div id="left">
            <select>
                <option>USA</option>
                <option>UK</option>
                <option>CN</option>
            </select>
            <span><a href="#">DAILDY DEALS</a></span>
            <span><a href="#">DAILDY DEALS</a></span>
            <span><a href="#">DAILDY DEALS</a></span>
            <span><a href="#">DAILDY DEALS</a></span>
        </div>
        <div id="right">
            <c:choose>
                <c:when test="${empty sessionScope.user}">
                    <span id="user"><a href="<c:url value="/jsps/user/login.jsp" />"><i class="fa fa-user"></i>登录</a></span>
                    <span id="shopcar"><a href="<c:url value='/regesit.jsp'/>"><i class="fa fa-shopping-cart"></i>注册</a></span>
                </c:when>
                <c:otherwise>
                    <span id="user"><i class="fa fa-user"></i>${user.getUsername()}</span>
                    <span id="shopcar"><a href="<c:url value='/UserServlet?method=quit'/>"><i class="fa fa-shopping-cart"></i>退出</a></span>
                </c:otherwise>
            </c:choose>

        </div>
    </div>
    <div id="headerMain" class="clearfix">
        <img src="http://ozz8m4qhr.bkt.clouddn.com/loge.png" width="59" height="24" id="loge">
        <ul id="nav" class="clearfix">
            <li class="navLi">
                <div class="navDiv">
                    <a href="<c:url value='/ProductServlet?method=findByCid&cid=2'/>">
                        WOMEN<i class="fa fa-angle-down"></i>
                    </a>
                </div>
            </li>
            <li class="navLi">
                <div class="navDiv">
                    <a href="<c:url value='/ProductServlet?method=findByCid&cid=2'/>">
                        MAN<i class="fa fa-angle-down"></i>
                    </a>
                </div>
            </li>
            <li class="navLi">
                <div class="navDiv">
                    <a>
                        KIDS<i class="fa fa-angle-down"></i>
                    </a>
                </div>
            </li>
            <li class="navLi">
                <div class="navDiv">
                    <a href="<c:url value="/cart.jsp"/>">
                        我的购物车<i class="fa fa-angle-down"></i>
                    </a>
                </div>
            </li>
        </ul>
        <div id="search">
            <span id="searchSpan1">LIVE FILLING-ROOM</span>
            <span id="searchSpan2"><span>ECO</span>FRIENDLY</span>
            <i class="fa fa-search"></i>
        </div>
    </div>
</div>
<div class="banner">
    <div><a href="#">10% student Discount ＞</a></div>
    <div><a href="#">$ 9.95 - unlimited next-day delivery for 1 yr  ＞</a></div>
    <div><a href="#">Rectangle 1 copy 5  ＞</a></div>
</div>
<div class="section">
    <p id="go"><a href="#" class="go1">HOMEPAGE  /  MEN   /</a><a class="go2" href="#">BASKET</a></p>

    <div id="mid">
        <!--图片展示区-->
        <div id="mid_mid" >
            <img src="${requestScope.product.getImgurl()}">
        </div>

        <div class="mid_right">
            <div id="top_get" >
                <script type="text/html" id="top_pass">

                    <h2 class="first">商品名称:${requestScope.product.getPname()}</h2>
                    <h3 class="second">商品销售量:${requestScope.product.getSellnum()}</h3>
                    <p class="nature">商品价格:${requestScope.product.getPrice()}</p>

                </script>
                <ul id="con_get">
                    <script type="text/html" id="con_pass">
                        <li>•&nbsp;&nbsp;&nbsp;&nbsp;价格</li>
                    </script>
                </ul>
            </div>
            <form action="<c:url value="/CartServlet"/>" method="post">
                <div class="mid_size">
                    <P>选择你的尺寸</P>
                    <div class="mid_button">
                       选择款式：<select name="size" style="width: 100px">
                            <option  value="XS">XS</option>
                            <option  value="S">S</option>
                            <option  value="M">M</option>
                            <option  value="L">L</option>
                            <option  value="XL">XL</option>
                        </select>
                    </div>
                    购买数量：<input type="text" size="3" name="count" value="1"/>
                    <input type="hidden" value="add" name="method">
                    <input type="hidden" value="${requestScope.product.getPid()}" name="pid">
                </div>
                <div class="mid_down">
                    <input type="button" value="购买" style="width: 120px">
                    <input type="submit" value="添加进购物车"  style="width: 120px">
                </div>
            </form>
            <p id="end_get"></p>
            <script type="text/html" id="end_pass">
                {{each endall as value index}}
                <span>{{value.sentence}}</span>
                {{/each}}
            </script>
        </div>
    </div>
</div>
<div class="section1">
    <h2 class="box">YOUR MAY ALSO LIKE</h2>
    <div id="clothes_get"></div>
    <script type="text/html" id="clothes_pass">
        {{each cloth as value index}}
        <div id="{{value.id1}}">
            <img src="{{value.imgPath}}">
            <p>{{value.title}}</p>
            <span>{{value.name}}</span>
            <span class="box_money">${{value.natural}}</span>
        </div>
        {{/each}}
    </script>
</div>
<div id="common-footer">
    <div id="footerTop">
        <ul id="list" class="clearfix">
            <li>
                <p>QUESTIONS?</p>
                <p>Help</p>
                <p>Track Order</p>
                <p>Returns</p>
            </li>
            <li>
                <p>WHAT'S IN STORE</p>
                <p>Help</p>
                <p>Track Order</p>
                <p>Returns</p>
            </li>
            <li>
                <p>MORE ABOUT</p>
                <p>Help</p>
                <p>Track Order</p>
                <p>Returns</p>
            </li>
            <li>
                <p>QUESTIONS?</p>
                <p>Help</p>
                <p>Track Order</p>
                <p>Returns</p>
            </li>
            <li>
                <p>MORE ABOUT</p>
                <p>Help</p>
                <p>Track Order</p>
                <p>Returns</p>
            </li>
        </ul>

        <p id="check">SHOPPING TO
            <select>
                <option>USA</option>
            </select>
        </p>
        <img src="img/Product/footer.jpg" width="388" height="22">
    </div>
    <div id="footerBottom">
        <span id="span1">
            <span>PRIVACY & COOKIIES</span>
            <span>PRIVACY & COOKIIES</span>
            <span>PRIVACY & COOKIIES</span>
            <span>PRIVACY & COOKIIES</span>
        </span><br>
        <span id="span2">this namsssw sswxzsja sjjcvud  skkvis</span><br>
        <span>
            <i class="fa fa-facebook"></i>
            <i class="fa fa-twitter"></i>
            <i class="fa fa-google"></i>
            <i class="fa fa-linkedin"></i>
        </span>
    </div>
</div>
</body>
<script src="js/lib/jquery.min.js"></script>
<script src="js/lib/template-web.js"></script>
<script src="js/module/Product.js"></script>
<script src="js/lib/velocity.min.js"></script>
</html>